home *** CD-ROM | disk | FTP | other *** search
/ Software Vault: The Diamond Collection / The Diamond Collection (Software Vault)(Digital Impact).ISO / cdr28 / dkcare30.zip / INSTALL.BAT < prev   
DOS Batch File  |  1995-02-27  |  7KB  |  178 lines

  1. @echo off
  2. cls
  3. If %1a == a goto Syntax
  4. echo.
  5. echo              ╔═══════════════════════════════════════════════════════╗
  6. echo              ║ WELCOME TO THE INSTALLATION PROGRAM FOR DiskCare v3.0 ║
  7. echo              ╚═══════════════════════════════════════════════════════╝
  8. echo.
  9. echo DiskCare v3.0 will be installed to %1
  10. echo.
  11. choice /cyn "Do you wish to continue "
  12. If errorlevel=2 goto alt
  13. If errorlevel=1 goto continue
  14.  
  15. :continue
  16. echo.
  17. echo ╔══════════════════════════════════════════════════════════════════════════╗ 
  18. echo ║ WARNING!!                                                                ║
  19. echo ║                                                                          ║
  20. echo ║ If you are updating DiskCare and you already have a previous version     ║
  21. echo ║ installed enter 'y' when it asks wheater to write over the old files.    ║
  22. echo ║                                                                          ║
  23. echo ╚══════════════════════════════════════════════════════════════════════════╝
  24. echo.
  25. echo Making the %1 directory.
  26. md %1
  27. echo.
  28. echo Unpacking to %1
  29. disk %1
  30. echo.
  31. echo For your Convenience a BATCH file has been provided. If your Destination
  32. echo Directory is different from C:\DISKCARE, then you must edit it. It will
  33. echo be MOVED to C:\DOS.
  34. echo.
  35. echo Press Space Bar To Continue
  36. pause>disk$$$$.tmp
  37. del disk$$$$.tmp
  38. copy %1\disk.bat c:\dos
  39. echo.
  40. goto ansi
  41.  
  42. choice /c:yn "Whould you like the Installation Files Deleted "
  43. If errorlevel=2 goto ansi
  44. If errorlevel=1 goto next
  45.  
  46. :next
  47. echo.
  48. echo Deleting Installation files.
  49. echo.
  50. del disk.exe
  51. del file_id.diz
  52. echo Installation Complete. Type 'DISK' to run.
  53. del install.bat
  54. goto end
  55.  
  56. :alt
  57. cls
  58. echo ╔════════════════════╗
  59. echo ║ ALTERNATE METHOD   ╠═══════════════════════════════════════════════════════╗
  60. echo ╚═╦══════════════════╝                                                       ║
  61. echo   ║                                                                          ║
  62. echo   ║ The alternate method for installation is:                                ║
  63. echo   ║                                                                          ║
  64. echo   ║ 1. Make desired directory.                                               ║
  65. echo   ║ 2. Copy/Move DISK.EXE to that Directory.                                 ║
  66. echo   ║ 3. Type 'DISK'. This will unpack the program.                            ║
  67. echo   ║ 4. Delete DISK.EXE, FILE_ID.DIZ & INSTALL.BAT                            ║
  68. echo   ║ 5. Copy/Move DISK.BAT to one of the Directories in your PATH statement   ║
  69. echo   ║ 6. Type 'DISK' to run.                                                   ║
  70. echo   ╚══════════════════════════════════════════════════════════════════════════╝
  71. echo.
  72. echo Your PATH statement:
  73. echo %path%
  74. echo.
  75. echo DiskCare v3.0 wasn't installed Correctly. Please try again.
  76. goto end
  77.  
  78. :syntax
  79. echo.
  80. echo.
  81. echo ╔════════════════════╗
  82. echo ║ INSTALLATION ERROR ╠═══════════════════════════════════════════════════════╗
  83. echo ╚═╦══════════════════╝                                                       ║
  84. echo   ║                                                                          ║
  85. echo   ║  The proper syntax to install Diskcare v3.0 is:                          ║
  86. echo   ║                                                                          ║
  87. echo   ║          INSTALL [DESTINATION]                                           ║
  88. echo   ║                                                                          ║
  89. echo   ║  DESTINATION is the complete path of the directory you wish to install   ║
  90. echo   ║              DiskCare v3.0 to.                                           ║
  91. echo   ║                                                                          ║
  92. echo   ║  EXAMPLE:                                                                ║
  93. echo   ║                                                                          ║
  94. echo   ║        Install C:\DISKCARE                                               ║
  95. echo   ║                                                                          ║
  96. echo   ╚══════════════════════════════════════════════════════════════════════════╝                                                                    
  97. echo.                                                                             
  98. echo DiskCare v3.0 wasn't installed Correctly. Please try again.                  
  99. goto end
  100.  
  101. :ansi
  102. cls
  103. echo.
  104. echo Checking to see if ANSI.SYS is loaded on your system.
  105. echo.
  106. find /i "ansi.sys" c:\config.sys
  107. If errorlevel=2 goto error
  108. If errorlevel=1 goto no_ansi
  109. If errorlevel=0 goto yes_ansi
  110.  
  111. :error
  112. echo.
  113. echo ╔══════════════════════════════════════════════════════════════════════════╗ 
  114. echo ║ WARNING!!                                                                ║
  115. echo ║                                                                          ║
  116. echo ║    An error has occured while searching for ANSI.SYS on your system.     ║
  117. echo ║    You must have the following line in the CONFIG.SYS file. Here is how  ║
  118. echo ║    you can add it:                                                       ║
  119. echo ║                                                                          ║
  120. echo ║        1. cd\                                                            ║
  121. echo ║        2. edit config.sys                                                ║
  122. echo ║        3. Add 'devicehigh=c:\dos\ansi.sys' to the last line.             ║
  123. echo ║                                                                          ║
  124. echo ╚══════════════════════════════════════════════════════════════════════════╝
  125. echo.
  126. echo DiskCare v3.0 wasn't installed correctly. Please try agian.
  127. echo.
  128. goto end
  129.  
  130. :no_ansi
  131. echo.
  132. echo ╔══════════════════════════════════════════════════════════════════════════╗ 
  133. echo ║ WARNING!!                                                                ║
  134. echo ║                                                                          ║
  135. echo ║    ANSI.SYS is not loaded on your system. ANSI.SYS needs to be loaded in ║
  136. echo ║    order for the colors in DiskCare v3.0 to work.                        ║
  137. echo ║                                                                          ║
  138. echo ╚══════════════════════════════════════════════════════════════════════════╝
  139. echo.
  140. choice /c:yn "Would you like ANSI.SYS to be loaded on your system "
  141. If errorlevel=2 goto bye
  142. If errorlevel=1 goto add_ansi
  143.  
  144. :add_ansi
  145. %1\addansi
  146. goto bye
  147.  
  148. :yes_ansi
  149. echo.
  150. echo ANSI.SYS was found on your system. I will assume it is loaded. If the
  151. echo phrase 'REM' is found before the 'DEVICE' statement then your system
  152. echo is ignoring it. The 'REM' will have to be removed.
  153. echo.
  154.  
  155. :bye
  156. echo.
  157. choice /c:yn "Whould you like the Installation Files Deleted "
  158. If errorlevel=2 goto after
  159. If errorlevel=1 goto next
  160. echo.
  161.  
  162. :next
  163. echo Deleting Installation files.
  164. echo.
  165. del disk.exe
  166. del file_id.diz
  167. echo Installation Complete. Type 'DISK' to run.
  168. del install.bat
  169. goto end
  170.  
  171. :after
  172. echo.
  173. echo Installation Complete. Type 'DISK' to run.
  174. echo.
  175.  
  176. :end
  177. echo.
  178.